Skip to content

feat(qt): deployed third-party component and license evidence (#35) - #330

Merged
JavaZeroo merged 2 commits into
mainfrom
agent/qt-third-party-license/artifact-manifest-prep-291e68b43ed7
Nov 9, 2026
Merged

JavaZeroo merged 2 commits into
mainfrom
agent/qt-third-party-license/artifact-manifest-prep-291e68b43ed7

Conversation

@JavaZeroo-Bot

@JavaZeroo-Bot JavaZeroo-Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

问题与最终行为

#35 已明确允许提前开展的独立范围(接续已合并的 #329):补齐正式 Qt 产品 staging 留下的 Qt 第三方组件来源与许可材料缺口。基线 1124ff04(#329 merge);不升级 Qt、不换许可选项、不引入新主要依赖、不发布 release/二进制、不关闭 #35/#7、不触发 Codex review;#27/#28/#29/#30/#38 仍 OPEN,不进入最终工作流验收。

本 PR 以固定 qtbase 6.10.3 源码归档(383dc907…,50,509,856 B)与 SDK 自带 SPDX SBOM(51bdcf25…)为准,把实际部署的 13 个 Qt 库/插件的第三方组件逐项追溯到模块、组件、版本、上游来源、归属文件与许可文本,并区分证据等级:

  • 新增 tools/build_qt_component_inventory.py:从固定归档 + SBOM 生成/复核清单。仅当 SBOM 包关系把第三方包连到已部署的 Qt 模块/插件,且与源码 qt_attribution.json 的 Id、版本、许可 id、许可文件交叉核对通过时才列为已部署;build 写清单与规范许可文本,check 重新解压固定归档、重算并逐字节比较。
  • 新增 third_party/qt/components.json:42 个已部署组件、13 个部署文件映射、22 份规范许可文本身份、2 个仅构建系统归属声明(extra-cmake-modules、KWin CMake 模块)、41 个源码树/未部署模块声明(显式标注“未部署”,不凭源码存在断言包含)。
  • 新增 third_party/qt/LICENSES/*.txt(22 份,取自同一固定归档 LICENSES/<id>.txt,逐文件 SHA-256);组件原始许可/版权文件与 qt_attribution.json 的成员路径与 SHA-256 记录在清单中。
  • staging 集成:tools/stage_qt_product.py 读入清单,按 prepared SDK 的 SBOM 重新推导并核验组件映射,带入规范许可文本、清单副本与生成的 QT-THIRD-PARTY-NOTICES.txt;缺文件、哈希不符、清单与 SBOM 不一致、已部署文件映射缺失均 fail closed。
  • packaging/qt-product/manifest.json、third_party/qt/manifest.json 记录清单入口与证据等级;CI 新增固定归档+SBOM 的 check 步骤,只上传路径无关的 manifest/清单/notice。
  • 文档更新:third_party/qt/README.md 记录证据分层、排除项、SBOM 身份限制与待审状态;src/qt/README.md、docs/FEATURES.md 同步 staging 内容与未完成边界。

验证

本地 Windows 11 x64、独立 worktree(从 1124ff04 新建)、VS 2022 toolset 14.42.34433、CMake 3.31.0、Python 3.15.2:

  • 清单生成/复核:build → 42 components / 22 license texts / 13 deployed files,SBOM 51bdcf25…、源码归档 383dc907…;随后 check(重新解压固定归档并逐字节比较)→ passed,重复 build 结果字节一致。
  • 工具契约测试:python -m unittest tools.test_prepare_qt_build tools.test_prepare_msvc_runtime tools.test_msvc_runtime tools.test_stage_qt_product tools.test_build_qt_component_inventory → 52/52 passed(新增 6 项 builder 测试与 staging 组件证据/失败路径测试,覆盖组件映射、排除分类、许可文本 pin、归档/SBOM 身份、清单漂移、缺失/篡改/额外文件)。
  • 真实 staging(固定依赖、独立 build):干净提交 d6cd5b3/tree f34ef10a、dirty=false → 60 文件,manifest_sha256=42cfacdc60eff821a95d7062a74f222a1279add2eab26b64eda9d34e5bcb4583,tree_sha256=0ced8ee40078b7114e1f77ba0250780e3886e14bdc515c8f19823fa2e7dcb432;verify → passed。
  • 失败路径实测:篡改 staged licenses/qt/components.json → file_identity:licenses/qt/components.json(exit 1);删除 staged licenses/qt/Zlib.txt → missing_product_file:licenses/qt/Zlib.txt(exit 1);把清单的部署组件映射改空后重新 staging → component_inventory_sbom_mismatch(exit 1)。
  • 实测限制已写入清单:固定归档内 SBOM 的 packaged-file 校验仅含 SHA-1,且 13/13 个部署文件与归档内 SDK 二进制不匹配;因此 SBOM 只作为模块/组件关系证据,部署文件字节身份由固定归档 SHA-256、prepare_qt_build SDK 树哈希与 staging 逐字节核对承担。
  • 清单与 staging manifest 不含本机绝对路径(已扫描 D:\/C:\/AppData 等)。
  • PR CI(pull_request run 42472101327,qt-cpp-windows 4m56s success):Verify preparation failure contracts、Prepare …、Verify deployed Qt component inventory against the pinned archive and SBOM、build、Stage the frozen Qt product and verify every file identity、12 项既有 Qt 回归全部 success。干净 checkout 产生的 staging:source commit 918d5734…、tree f34ef10a…、dirty=false;manifest_sha256=8f4fea94651bb59c4aa3b5289b2b8e503203e785d753f21ffde9906aaab3d1a8,tree_sha256=c7bb018344428379a0363aabefee2bd76d1d630936c6cf1b50851b5f2bc8eb11(60 files);入口 termforge_qt_shell.exe 292,352 B、SHA-256 2f90b6145e27f2100d9fc3a5dc04eab983ab0af55f1eca748d423c118908cebe;staging 内组件清单 e1cfbe01…、Qt notice fa54c9fe…。

CI 失败账本(head d6cd5b3b66c5293b6eb7f4ccf5bdfb1f6d6bb6ae)

PR-event 与 push-event 分开记录;不把 PR-event 成功等同所有检查已绿。

PR-event(pull_request)

  • Qt C++ fixed ConPTY build and smoke:run 42472101327,attempt 1,job 128705044371 → success(4m56s),含 Verify deployed Qt component inventory against the pinned archive and SBOM 与 staging+verify。
  • Build and synthetic regression:run 42472101412,attempt 1,job 128705044570(ubuntu)success(3m48s),job 128705044789(windows)success(16m30s,138/138)。

push-event(push,重复 run)

  • Qt C++ fixed ConPTY build and smoke:run 42472081970,head d6cd5b3;attempt 1 job 128704977287、attempt 2 job 128706350444 均 failure;失败点均为 Prepare manifest-pinned Qt qtbase, Microsoft ConPTY and CRT → prepare_qt_build 输出 {"status":"failed","error":"download_failed"};此前 52 项工具测试通过,尚未配置/构建产品。现有日志不含下载端点、HTTP 状态或异常类型,根因未确定(不写成 runner 环境故障)。自动恢复用尽后,经用户/调度明确授权执行唯一一次额外失败作业重跑 → attempt 3 job 128930813088 → success(4m17s):Prepare …、inventory check、configure、build、staging+verify、12/12 CTest、hosted/hosted-windows clipboard 与 Post actions 全部通过。累计重试=2(attempt 2 自动 + attempt 3 授权),故障 pr330-qt-download-failed-d6cd5b3 已清除;不再触发任何重试、不通过新提交/新 workflow 绕过。
  • Build and synthetic regression:run 42472081975,attempt 1 job 128704977218(windows)failure:windterm_raster_style_reference 的 Node 夹具 10 秒超时,preload checkpoint 未写、partial stdout 0;同 run ubuntu job 128704977396 success。经调度者授权的唯一一次失败 Windows job 重试 → attempt 2 job 128743974520 → success(11m27s),同 run Linux 结果保留(attempt 2 job 128743975478 success);若再次失败本不会二次重试。

剩余解除条件

  1. push-event Qt run:已按用户授权完成唯一一次额外失败作业重跑并成功(attempt 3);不再重试。
  2. push-event regression:唯一一次失败 job 重试已成功(attempt 2);无进一步动作。
  3. 当前 head d6cd5b3 的 PR checks 6/6 green;合并仍由调度者决定,本 PR 未改代码、超时或测试以绕过额度,也未自行合并。

性能影响(如适用)

无性能结论;不改变运行时路径,不做性能测量,不使用未确认的数值容差。新增 CI 仅做离线清单复核、staging 与既有 Qt 回归。

来源与限制

JavaZeroo-Bot and others added 2 commits November 8, 2026 18:35
- Add tools/build_qt_component_inventory.py: derive the deployed Qt 6.10.3
  component and license inventory from the pinned qtbase source archive and
  the SPDX SBOM shipped in the prepared SDK. A component is listed as shipped
  only when the SBOM package graph connects it to a deployed Qt module/plugin
  and the source attribution entry (Id, version, license ids, license files)
  cross-checks; build-tool and non-deployed-module declarations are recorded
  as excluded instead of being treated as shipped.
- Record the measured limitation that the SBOM packaged-file SHA-1 values do
  not match the archived SDK binaries, so deployed-file byte identity stays
  bound to the pinned archive SHA-256 and the prepared SDK tree digest.
- Commit third_party/qt/components.json (42 deployed components, 22 canonical
  license texts, 2 excluded build-system attributions, 41 recorded
  source/other-module declarations) and the LICENSES texts extracted from the
  same pinned archive with per-file SHA-256.
- Add offline builder tests covering component mapping, exclusion categories,
  license-text pinning, archive/SBOM identity, checksum recording and drift
  detection.
- Document the evidence levels and the still-open review in the Qt dependency
  README.

Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
- Stage the committed Qt component inventory, canonical license texts and the
  generated Qt third-party notice index; at staging time re-derive the
  component mapping from the prepared SDK SBOM, require the inventory and
  license-text hashes to match, and fail closed on missing, extra, stale or
  tampered evidence. An existing output directory is still never overlaid.
- Extend the frozen staging contract and product manifest with the component
  inventory and notice files; keep the redistribution state explicitly at
  materials-prepared, user review pending.
- Check the committed inventory against the pinned source archive and SBOM in
  the Qt C++ CI workflow, and upload only path-free manifest, inventory and
  notice files.
- Update the Qt entry and capability documentation with the new staging
  contents and the remaining corresponding-source/clean-machine gaps.

Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
@JavaZeroo
JavaZeroo merged commit 31a9992 into main Nov 9, 2026
7 of 10 checks passed
JavaZeroo-Bot added a commit that referenced this pull request Nov 12, 2026
…ecord-hidden-retention-2e7373117ea0

Union both sides: keep the bounded autoscroll Qt target/CTest entry and
the #324 system paste, #333 BCD fixtures, #330/#331 packaging and
#328 eight-session capabilities with their assertions.

Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants